package br.com.advocacia.logica.contract;

import java.io.Serializable;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface DefaultLogicaContract<T> extends Serializable {
	
	public void adicionar(T entidade) throws Exception;
	public void editar(T entidade) throws Exception;
	public void remover(@SuppressWarnings("rawtypes") Class entidade, Long idEntidade) throws Exception;
	
	public T obterPorId(@SuppressWarnings("rawtypes") Class entidade, Long idEntidade) throws Exception;
	public List<T> buscarTodos(@SuppressWarnings("rawtypes") Class entidade, String campoOrdenacao) throws Exception;
	public List<T> buscarPorCampo(@SuppressWarnings("rawtypes") Class entidade, String campo, Object valor) throws Exception;
	
}